package 二叉树层序遍历.二叉树层序遍历II;

import java.util.List;

public class Test {
    public static void main(String[] args) {
        // Create a binary tree for testing
        TreeNode rootOne = new TreeNode(1);
        rootOne.left = new TreeNode(2);
        rootOne.right = new TreeNode(3);
        rootOne.left.left = new TreeNode(4);
        rootOne.left.right = new TreeNode(5);
        rootOne.right.left = new TreeNode(6);
        rootOne.right.right = new TreeNode(7);

        TreeNode rootTwo = new TreeNode(3);
        rootTwo.left = new TreeNode(9);
        rootTwo.right = new TreeNode(20);
        rootTwo.right.left = new TreeNode(15);
        rootTwo.right.right = new TreeNode(7);


        Solution solution = new Solution();
        // Call the method to test
        List<List<Integer>> result = solution.levelOrderBottom(rootTwo);

        // Print the result
        System.out.println(result);
    }
}
